<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>DEMO接口文档-ApiPost</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="接口文档,ApiPost">
<meta name="description" content="本文档由可直接生成文档的API调试、管理工具ApiPost生成">
<!--自适应声明部分-->
<meta name="applicable-device" content="pc" />
<link rel="shortcut icon" href="https://console.apipost.cn/favicon.ico">
<link rel="stylesheet" type="text/css" href="https://img.cdn.apipost.cn/statics/bootstrap.css">
<link rel="stylesheet" type="text/css" href="https://img.cdn.apipost.cn/statics/build-in/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="https://img.cdn.apipost.cn/statics/build-in/bootstrap/css/document.css?v=2152">
<link rel="stylesheet" type="text/css" href="https://img.cdn.apipost.cn/statics/build-in/bootstrap/css/markdown.css?v=1326">
<link rel="stylesheet" type="text/css" href="https://img.cdn.apipost.cn/statics/build-in/nprogress-0.2.0/nprogress.css">
<link rel="stylesheet" type="text/css" href="https://console.apipost.cn/doc/statics/css/doc.css">
<script type="text/javascript" src="https://img.cdn.apipost.cn/statics/build-in/jquery/jquery.min.js"></script>
<script type="text/javascript" src="https://img.cdn.apipost.cn/statics/build-in/clipboard.js-master/clipboard.min.js"></script>
<script type="text/javascript" src="https://img.cdn.apipost.cn/statics/build-in/nprogress-0.2.0/nprogress.js"></script>
<script type="text/javascript" src="https://img.cdn.apipost.cn/statics/build-in/bootstrap/js/bootstrap.js"></script>
<script language="javascript">
	$(function(){
		let _clipboard = new ClipboardJS('.api-test-send-btn');

        _clipboard.on('success', function(e) {
            e.clearSelection();
        });

        _clipboard.on('error', function(e) {
            console.log(e);
        });

        $(document).on('click', '.api-test-send-btn', function(){
        	let _href = $(this).attr('data-href');
        	window.open(_href);
        });

		let _left_menus = [{"parent_id":"0","folder_id":"60798","name":"Jwt","item":[{"apiid":"349625","name":"\u6d4b\u8bd5\u63a5\u53e3","sort":"0","folder_id":"60798"},{"apiid":"349624","name":"\u767b\u5f55\u63a5\u53e3","sort":"0","folder_id":"60798"}]}];
		let _init_apiid = 349625;

		if(window.location.hash){
			let _hash_apiid = parseInt(window.location.hash.substr(1));
			_init_apiid = _hash_apiid ? _hash_apiid : _init_apiid;
		}

		//收缩文档页面左侧菜单
        let _is_pull = 0;
        $('.document-pull-left').click(function(){
            _is_pull = !_is_pull;

            if(_is_pull){
                $(".book-summary").css("left","-300px");
                $(".book-body").css("left","0");
            }else{
                $(".book-summary").css("left","0");
                $(".book-body").css("left","300px");
            }
        });

        //文档上一页
        $('.navigation-prev').click(function(){
        	// let _length = $('.load-api-btn').length;
        	let _index = Math.max($('.load-api-btn').index($('.load-api-btn.active')) - 1, 0);
        	let _apiid = parseInt($('.load-api-btn').eq(_index).attr('data-id'));

        	_load_document(_apiid);
        });

        //文档下一页
        $('.navigation-next').click(function(){
        	let _length = $('.load-api-btn').length;
        	let _index = Math.min($('.load-api-btn').index($('.load-api-btn.active')) + 1, _length - 1);
        	let _apiid = parseInt($('.load-api-btn').eq(_index).attr('data-id'));

        	_load_document(_apiid);
        });

		//分享文档地址
        $(".export-document-link-btn").click(function() {
            $(this).attr('data-clipboard-text', 'https://console.apipost.cn/doc/49686?du_id=0');
            let _clipboard = new ClipboardJS('.export-document-link-btn');
            _clipboard.on('success', function(e) {
                alert('文档地址复制成功，您可以转发给您的小伙伴啦~');
                e.clearSelection();
                return true;
            });

            _clipboard.on('error', function(e) {
                alert('复制失败，请重试');
                return false;
            });
        });

		//加载左侧菜单
		_load_menu();
		$('.api-search-word').on('input change', function(){
			_load_menu();
		});

		$('.document-summary').on('click', '.load-api-btn', function(){
			let _this = this;
			let _apiid = parseInt($(_this).attr('data-id'));
			_load_document(_apiid);
		}).on('click', 'a[data-type="category"]', function(){
			$(this).next('.articles').toggle();

			if($(this).children('.fa').eq(0).hasClass('fa-folder-open-o')){
				$(this).children('.fa').eq(0).addClass('fa-folder-o').removeClass('fa-folder-open-o');
			}else{
				$(this).children('.fa').eq(0).addClass('fa-folder-open-o').removeClass('fa-folder-o');
			}
		}).on('click', '.load-sub-btn', function () {
            let _this = this;
            let _folder_id = parseInt($(_this).attr('data-id'));
            $('.sub-folder-' + _folder_id).toggle();
            if($(_this).children('.fa').eq(0).hasClass('fa-folder-open-o')){
                $(_this).children('.fa').eq(0).addClass('fa-folder-o').removeClass('fa-folder-open-o');
            }else{
                $(_this).children('.fa').eq(0).addClass('fa-folder-open-o').removeClass('fa-folder-o');
            }
        });

		//加载右侧文档
		_load_document(_init_apiid);

		//私有函数
		//加载右侧文档函数
		function _load_document(_apiid){
			NProgress.start();
			$('.chapter').removeClass('active');
			$('.chapter[data-id="'+_apiid+'"]').addClass('active');
			$('.page-wrapper').addClass('hide');
			$('.page-wrapper[tabindex="'+_apiid+'"]').removeClass('hide');
			$('.load-api-btn').removeClass('active');
			$('.load-api-btn[data-id="'+_apiid+'"]').addClass('active');

			//隐藏空的元素
			$('.document-block-div').each(function(){
				let _this = this;
				let _length = $(_this).find('tbody').eq(0).children().length;
				// console.log(_length);
				if(!_length){
					$(_this).hide();
				}
			});

			window.location.hash='#' + _apiid;
			NProgress.done();
		}

		//加载左侧菜单函数
        function _load_menu(){
        	let _keyword = $.trim($('.api-search-word').val());

        	//左侧渲染
	        $('.document-summary').empty();
	        for(let _x in _left_menus){
	            if(_left_menus[_x].item.length > 0){
                    let _html = '<li class="chapter">';
                    _html += '   <a href="javascript:;" class="' + (parseInt(_left_menus[_x].folder_id) == -1 ? 'default-folder':'') + '" data-type="category" data-id="' + _left_menus[_x].folder_id + '"><i class="fa fa-folder-open-o" aria-hidden="true"></i><strong>' + _left_menus[_x].name + '</strong></a>';
                    _html += '   <ul class="articles">';

                    for(let _l in _left_menus[_x].item){
                        if(!_left_menus[_x].item[_l].hasOwnProperty('apiid')){
                            let _sub_api_html = '';
                            for(let _s in _left_menus[_x].item[_l].item){
                                if(_left_menus[_x].item[_l].item[_s].name.indexOf(_keyword) > -1 || _keyword == '') {
                                    _sub_api_html += '<li class="chapter text-indent-2 ' + (parseInt(_left_menus[_x].item[_l].item[_s].apiid) == _init_apiid ? 'active' : '') + '" data-id="' + _left_menus[_x].item[_l].item[_s].apiid + '"><a class="load-api-btn" href="#' + _left_menus[_x].item[_l].item[_s].apiid + '" data-type="api" data-id="' + _left_menus[_x].item[_l].item[_s].apiid + '"><i class="fa fa-file-text-o" aria-hidden="true"></i>' + _left_menus[_x].item[_l].item[_s].name + ' </a> </li>';
                                }
                            }

                            if(_sub_api_html != ''){
                                _html += '<li class="chapter" data-id="' + _left_menus[_x].item[_l].folder_id + '"><a class="load-sub-btn" href="javascript:;" data-type="api" data-id="' + _left_menus[_x].item[_l].folder_id + '"><i class="fa fa-folder-open-o" aria-hidden="true"></i>' + _left_menus[_x].item[_l].name + ' </a> </li>';
                                _html += '<ul class="sub-folder-' + _left_menus[_x].item[_l].folder_id + '">';
                                _html += _sub_api_html;
                                _html += '</ul>';
                            }
                        }else{
                            if(_left_menus[_x].item[_l].name.indexOf(_keyword) > -1 || _keyword == ''){
                                _html += '<li class="chapter ' + (parseInt(_left_menus[_x].item[_l].apiid) == _init_apiid ? 'active':'') + '" data-id="' + _left_menus[_x].item[_l].apiid + '"><a class="load-api-btn" href="#' + _left_menus[_x].item[_l].apiid + '" data-type="api" data-id="' + _left_menus[_x].item[_l].apiid + '"><i class="fa fa-file-text-o" aria-hidden="true"></i>' + _left_menus[_x].item[_l].name + ' </a> </li>';
                            }
                        }
                    }
                    _html += '   </ul>';
                    _html += '</li>';

                    $('.document-summary').append(_html);
                }
	        }
        }
	});
</script>
<style type="text/css">
	/*common.css*/
	*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none;-webkit-touch-callout:none;-webkit-font-smoothing:antialiased;font-family:..., "PingFangSC-Regular", "sans-serif", "Hiragino Sans GB", "Microsoft YaHei","WenQuanYi Micro Hei", sans-serif;font-size: .9rem!important ;  outline: none!important;}
	html{outline: none!important;}
	body{background:#f5f7fa}
	a{text-decoration: none}
	a:hover{text-decoration: none}
	img{border:0;}
	a:focus,button:focus{box-shadow: none!important;}
	table,td,th{table-layout:fixed;word-break:break-all; vertical-align: top}

	/*共用按钮*/
	/*橙色*/
	.btn-orange{ background-color: #ff5722!important; border-color: #ff5722!important;color:#fff;}
	.btn-orange:hover{background-color: #f76b40!important;color:#fff;}

	/*灰色*/
	.btn-gray{background-color: #e9ecef!important;color: #6c757d!important;}
	.btn-gray:hover{background-color: #dee2e6!important;color: #6c757d!important;}
    .load-api-btn{position: relative}
    .load-api-btn .api-modify-tips{width: 6px;height: 6px;border-radius: 50%;padding: 0!important;background: #dc3545!important;position: absolute!important;left: 25px;top: 8px;display: none}
    .load-api-btn:hover{color:#dc3545!important;}
    .api-name-class:hover{text-decoration: none}
    .api-name-class .btn-gray{margin-left: 15px;padding: 3px 8px;display: inline-block;}
    .api-name-class .btn-gray:hover{text-decoration: none!important;}
    /*.text-indent-2{text-indent: 1em}*/
    .request_raw_body_desc_textarea{width: 100%; border: 0; height: auto}
	/*弹窗*/
	.modal.show .modal-dialog{top:180px!important;}
	.modal-title{font-size: 1.05rem!important}
	.modal-header {display: -ms-flexbox;display: flex;-ms-flex-align: start;align-items: flex-start;-ms-flex-pack: justify;justify-content: space-between;background-color: #353644;padding: 10px 20px;color: #fff;border-top-left-radius: 0!important;border-top-right-radius: 0!important;}
	button.close{font-size: 18px!important; color: #fff!important}
	.modal-mm{max-width: 370px}
	.modal-body .alert-warning {width: 100%;}
	/*图标 /*/
    .markdown-section blockquote{padding: 10px 15px;background: #f7f7f7;}
	.fa{margin-right:8px}

    /*默认文件夹默认隐藏*/
    .default-folder{visibility: hidden;margin-top: -38px;}
    .chapter:hover .default-folder{visibility: visible;margin-top: 0px;}
    .hidden-value{display: none;}
</style>
</head>
<body>
<div class="book">
  	<div class="book-summary">
    	<div id="book-search-input" role="search">
      		<input type="text" class="api-search-word" placeholder="输入关键词搜索文档">
      	</div>
    	<nav>
      		<ul class="summary document-summary"></ul>
    	</nav>
  	</div>
  	<div class="book-body">
    	<div class="no-apis"></div>
    	<div class="body-inner">
	      	<div class="book-header">
		        <div class="dropdown">
		          	<a class="btn pull-left document-pull-left" href="javascript:;">&nbsp;
		            	<i class="fa fa-align-justify"></i></a>
		          	<a class="btn" href="https://console.apipost.cn/doc/createHtml/49686?du_id=0" target="_blank">
		            	<i class="fa fa-html5" aria-hidden="true"></i>导出HTMl</a>
		            	<!-- <a class="dropdown-item export-md-btn" href="javascript:;"><i class="fa fa-file-code-o" aria-hidden="true"></i>导出MD</a> -->
		            <a class="btn export-btn" href="https://console.apipost.cn/doc/createMD/49686?du_id=0" target="_blank">
		            	<i class="fa fa-file-code-o" aria-hidden="true"></i>导出MarkDown</a>
		          	<a class="btn export-btn" href="https://console.apipost.cn/doc/createDocx/49686?du_id=0" target="_blank">
		            	<i class="fa fa-file-word-o" aria-hidden="true"></i>导出Doc</a>
		            <a class="btn export-btn" href="https://console.apipost.cn/doc/createPdf/49686?du_id=0" target="_blank">
		            	<i class="fa fa-file-pdf-o" aria-hidden="true"></i>导出Pdf</a>
		          	<a class="btn export-document-link-btn" href="javascript:;">
		            	<i class="fa fa-external-link" aria-hidden="true"></i>复制文档地址</a>
		        </div>
		        <h1><!-- DEMO接口文档 --></h1>
	    	</div>
	    	                        	    	<div class="page-wrapper hide" tabindex="349625" role="main">
	        	<div class="page-inner">
	          		<section class="markdown-section">
	            		<h1 class="api-name-class"><i class="fa fa-link" aria-hidden="true"></i>测试接口 <button  type="button" data-href="https://www.apipost.cn/client.php?project_id=49686&apiid=349625" class="btn btn-gray api-test-send-btn"  data-clipboard-text="{&quot;apiid&quot;:&quot;349625&quot;,&quot;name&quot;:&quot;测试接口&quot;,&quot;url&quot;:&quot;localhost:8080\/api\/getMessage&quot;,&quot;method&quot;:&quot;GET&quot;,&quot;mark&quot;:&quot;developing&quot;,&quot;request_type&quot;:&quot;1&quot;,&quot;request_header_ischecked&quot;:&quot;1&quot;,&quot;request_query_ischecked&quot;:&quot;0&quot;,&quot;request_body_ischecked&quot;:&quot;1&quot;,&quot;auth&quot;:[],&quot;request_header&quot;:[{&quot;indent&quot;:&quot;0&quot;,&quot;key&quot;:&quot;token&quot;,&quot;value&quot;:&quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxMjMifQ.hGF75Ls9GrdHu1_qxgob4sTO9OGGCq4HV0g6boHJpk8&quot;,&quot;not_null&quot;:&quot;&quot;,&quot;placeholder&quot;:&quot;参数值&quot;,&quot;type&quot;:&quot;Text&quot;,&quot;description&quot;:&quot;&quot;,&quot;isencode&quot;:&quot;0&quot;,&quot;is_para_checked&quot;:&quot;1&quot;}],&quot;request_query&quot;:[],&quot;request_body&quot;:[{&quot;indent&quot;:&quot;0&quot;,&quot;key&quot;:&quot;&quot;,&quot;value&quot;:&quot;&quot;,&quot;not_null&quot;:&quot;0&quot;,&quot;placeholder&quot;:&quot;参数值&quot;,&quot;type&quot;:&quot;Text&quot;,&quot;description&quot;:&quot;&quot;,&quot;isencode&quot;:&quot;0&quot;,&quot;is_para_checked&quot;:&quot;1&quot;}],&quot;request_raw_body&quot;:&quot;&quot;}"><i class="fa fa-paper-plane-o" aria-hidden="true"></i>接口测试</button> </h1>
	            		                        	            		<h4>接口URL</h4>
	            		<code>localhost:8080/api/getMessage</code>
                        	            		<h4>请求方式</h4>
	            		<code>GET</code>
                                                                        	            		<!-- 开始 request_all_header -->
	            		
	            		<!-- 开始 request_header -->
	            			            		<div class="document-block-div request_header-div">
		            		<h4>请求自定义Header</h4>
		            		<table>
		              			<thead>
		                			<tr>
			                  			<th style="width: 28%">参数</th>
			                  			<th style="width: 30%">示例值</th>
                                        <th style="width: 7%">必填</th>
			                  			<th style="width:35%">参数描述</th>
			                  		</tr>
		              			</thead>
		              			<tbody>
		              						              						              				<tr>
			                  			<th>token</th>
			                  			<td>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxMjMifQ.hGF75Ls9GrdHu1_qxgob4sTO9OGGCq4HV0g6boHJpk8</td>
                                        <td>必填</td>
			                  			<td>-</td>
			                  		</tr>
			                  				              						              			</tbody>
		            		</table>
		            	</div>
	            		
	            		<!-- 开始 request_body -->
                        	            			            			            		<div class="document-block-div request_body-div">
		            		<h4>请求Body参数</h4>
		            		<table>
		              			<thead>
		                			<tr>
			                  			<th style="width: 28%">参数</th>
                                        <th style="width: 30%">示例值</th>
                                        <th style="width: 7%">必填</th>
			                  			<th style="width:35%">参数描述</th>
			                  		</tr>
		              			</thead>
		              			<tbody>
		              						              						              						              			</tbody>
		            		</table>
		            	</div>
	            								                        
						<!-- 开始 request_Query -->
	            		
	            		<!-- 开始 response_header -->
	            		
	            		<!-- 开始 response_cookie -->
	            		
	            		<!-- 开始 response_body -->
	            		
	            		<!-- 开始 response_body_text_ishide -->
	            			            		<h4>成功响应示例</h4>
	            		<pre><code>你已通过验证</code></pre>
	            		
	            		<!-- 开始 response_body_error_text -->
	            			          		</section>
	        	</div>
	      	</div>
            	      	                        	    	<div class="page-wrapper hide" tabindex="349624" role="main">
	        	<div class="page-inner">
	          		<section class="markdown-section">
	            		<h1 class="api-name-class"><i class="fa fa-link" aria-hidden="true"></i>登录接口 <button  type="button" data-href="https://www.apipost.cn/client.php?project_id=49686&apiid=349624" class="btn btn-gray api-test-send-btn"  data-clipboard-text="{&quot;apiid&quot;:&quot;349624&quot;,&quot;name&quot;:&quot;登录接口&quot;,&quot;url&quot;:&quot;localhost:8080\/api\/login&quot;,&quot;method&quot;:&quot;POST&quot;,&quot;mark&quot;:&quot;developing&quot;,&quot;request_type&quot;:&quot;1&quot;,&quot;request_header_ischecked&quot;:&quot;0&quot;,&quot;request_query_ischecked&quot;:&quot;0&quot;,&quot;request_body_ischecked&quot;:&quot;1&quot;,&quot;auth&quot;:[],&quot;request_header&quot;:[],&quot;request_query&quot;:[],&quot;request_body&quot;:[{&quot;indent&quot;:&quot;0&quot;,&quot;key&quot;:&quot;username&quot;,&quot;value&quot;:&quot;bai&quot;,&quot;not_null&quot;:&quot;&quot;,&quot;placeholder&quot;:&quot;参数值&quot;,&quot;type&quot;:&quot;Text&quot;,&quot;description&quot;:&quot;&quot;,&quot;isencode&quot;:&quot;0&quot;,&quot;is_para_checked&quot;:&quot;1&quot;},{&quot;indent&quot;:&quot;0&quot;,&quot;key&quot;:&quot;password&quot;,&quot;value&quot;:&quot;123456&quot;,&quot;not_null&quot;:&quot;&quot;,&quot;placeholder&quot;:&quot;参数值&quot;,&quot;type&quot;:&quot;Text&quot;,&quot;description&quot;:&quot;&quot;,&quot;isencode&quot;:&quot;0&quot;,&quot;is_para_checked&quot;:&quot;1&quot;}],&quot;request_raw_body&quot;:&quot;&quot;}"><i class="fa fa-paper-plane-o" aria-hidden="true"></i>接口测试</button> </h1>
	            		                        	            		<h4>接口URL</h4>
	            		<code>localhost:8080/api/login</code>
                        	            		<h4>请求方式</h4>
	            		<code>POST</code>
                                                                            <h4>请求 Content-Type</h4>
                            <code>Array</code>
                                                	            		<!-- 开始 request_all_header -->
	            		
	            		<!-- 开始 request_header -->
	            		
	            		<!-- 开始 request_body -->
                        	            			            			            		<div class="document-block-div request_body-div">
		            		<h4>请求Body参数</h4>
		            		<table>
		              			<thead>
		                			<tr>
			                  			<th style="width: 28%">参数</th>
                                        <th style="width: 30%">示例值</th>
                                        <th style="width: 7%">必填</th>
			                  			<th style="width:35%">参数描述</th>
			                  		</tr>
		              			</thead>
		              			<tbody>
		              						              						              				<tr>
			                  			<th>username</th>
			                  			<td>bai</td>
                                        <td>必填</td>
			                  			<td>-</td>
			                  		</tr>
			                  				              						              						              				<tr>
			                  			<th>password</th>
			                  			<td>123456</td>
                                        <td>必填</td>
			                  			<td>-</td>
			                  		</tr>
			                  				              						              			</tbody>
		            		</table>
		            	</div>
	            								                        
						<!-- 开始 request_Query -->
	            		
	            		<!-- 开始 response_header -->
	            		
	            		<!-- 开始 response_cookie -->
	            		
	            		<!-- 开始 response_body -->
	            		
	            		<!-- 开始 response_body_text_ishide -->
	            			            		<h4>成功响应示例</h4>
	            		<pre><code>{
    "user": {
        "password": "123456",
        "Id": "123",
        "username": "bai"
    },
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxMjMifQ.hGF75Ls9GrdHu1_qxgob4sTO9OGGCq4HV0g6boHJpk8"
}</code></pre>
	            		
	            		<!-- 开始 response_body_error_text -->
	            			          		</section>
	        	</div>
	      	</div>
            	      		      	<footer>
	      		本文档由<a href="https://www.apipost.cn/?fr=doc" target="_blank">APIPOST接口调试与管理工具</a>生成
	      	</footer>
	    </div>
	    <a href="javascript:;" class="navigation navigation-prev">
	      	<i class="fa fa-angle-left" aria-hidden="true"></i>
	    </a>
	    <a href="javascript:;" class="navigation navigation-next" style="margin-right: 17px;">
	      	<i class="fa fa-angle-right" aria-hidden="true"></i>
	    </a>
	</div>
</div>
<!-- 百度统计 -->
<script>
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "https://hm.baidu.com/hm.js?a046ce178828e393614822a297b8d296";
	  var s = document.getElementsByTagName("script")[0];
	  s.parentNode.insertBefore(hm, s);
	})();
</script>
<span style="display: none;"><script type="text/javascript" src="https://s23.cnzz.com/z_stat.php?id=1276797738&web_id=1276797738"></script></span>
</body>
</html>
